package com.twu.biblioteca;

import java.io.PrintStream;

/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworks
 * Date: 8/21/13
 * Time: 9:22 AM
 * To change this template use File | Settings | File Templates.
 */
public class OptionParser {


    private Library library;
    private PrintStream printer;

    public OptionParser(Library library, PrintStream printer){
        this.library = library;
        this.printer = printer;
    }

    public void checkOptionValidity(String userInput) {
        if (userInput.equals("1")) {
            library.displayBookList();
        }
        else if (userInput.equals("2")) {
            library.displayBookList();
            printer.println("Enter the title of the book you wish to reserve.");
        }
        else if (userInput.equals("3")) {
            printer.println("Please talk to a Librarian. Thank you.");
        }
        else
            printer.println("Select a Valid Option!!");
    }
}
